﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/include/context.jsp" %>
<form action="${ctx}/user/usermanager/savemodifyrole" method="post"  style="margin: 0px;">
	
	<input type="hidden" name="user.id" value="${user.id}">
	<table cellspacing="0" cellpadding="0" class="form-grid">
		<tbody>
			<tr>
				<td style="text-align: right; padding-right: 3px; width: 30%;">用户名：</td>
				<td>${user.name}</td>
				<td style="text-align: right; padding-right: 3px; width: 30%;">用户职位：</td>
				<td>${user.position}</td>
			</tr>
			
			<tr>
				<td style="text-align: right; padding-right: 3px; width: 30%;">email：</td>
				<td>${user.email}</td>
				<td style="text-align: right; padding-right: 3px; width: 30%;">联系电话：</td>
				<td>${user.telephone}</td>
			</tr>
			
			<tr>
				<td style="text-align: right; padding-right: 3px; width: 30%;">用户状态：</td>
				<td>${empty user.disabled || user.disabled ? '禁用' : '启用'}</td>
				<td style="text-align: right; padding-right: 3px; width: 30%;">用户描述：</td>
				<td>${user.description}</td>
			</tr>
			<tr>
				<td style="text-align: right; padding-right: 3px; width: 30%;">用户角色：</td>
				
				<td colspan="3">
					<table class="grid" cellspacing="0">
						<thead>
							<tr>
								<td> 选择 </td>
								<td> 角色描述 </td>
							</tr>
						</thead>
						<tbody>
							<c:forEach var="role" items="${roles}">
								<tr onmouseover="this.style.backgroundColor= '#A0CFEC'" onmouseout="this.style.backgroundColor= '#ffffff'">
								<tr>
									<td> 
										<c:if test="${role.select}">
											<input type="checkbox" name="roleIds" value="${role.id}" checked="checked">
										</c:if>
										
										<c:if test="${!role.select}">
											<input type="checkbox" name="roleIds" value="${role.id}" >
										</c:if>
									</td>
									<td> ${role.description} </td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
				</td>
			</tr>
		</tbody>
	</table>
			
	<div class="window_footer"><input type="submit" value="确定"></div>
</form>

<%@ include file="/include/script.jsp" %>

	
